package com.enhe.gck.fg;

import com.enhe.gck.item.CPXSHZBYDJHWANE20873Item;
import com.kuangkie.carbon.fg.*;
import com.kuangkie.carbon.record.FGRecord;
import com.kuangkie.carbon.util.StringHelper;
import org.springframework.stereotype.Repository;
import com.kuangkie.carbon.record.FGRecordComplexus;
import com.kuangkie.carbon.record.ProRecord;
import com.enhe.gck.CarbonBaseConstant; //模型Code
import com.enhe.gck.CarbonEnumKeyValue; //枚举字典信息
import com.enhe.gck.CarbonRelationType; //关系类型Code
import com.enhe.gck.item.YLCGHZBHWANE20906Item; // 模型属性Code

@Repository(value = "hwane20906366042330866425862")
public class YLCGHZBHWANE20906BNB implements FetchFuncGroup,FunctionGroup{

	@Override
	public void fetchImprove(FuncGroupContext context, FGRecord record, FetchResultFactory fetchResultFactory) {
		String date =record.getString(YLCGHZBHWANE20906Item.维度_日期);
		if(StringHelper.isBlank(date)){
			String year =record.getString(YLCGHZBHWANE20906Item.维度_年);
			String month =record.getString(YLCGHZBHWANE20906Item.维度_月);
			String day =record.getString(YLCGHZBHWANE20906Item.维度_日);
			date="";
			if(StringHelper.isNotBlank(year)){
				date=date+year;
			}
			if(StringHelper.isNotBlank(month)){
				date=date+"-"+month;
			}
			if(StringHelper.isNotBlank(day)){
				date=date+"-"+day;
			}
		}

		fetchResultFactory.getRecordOpsBuilder().putAttribute(YLCGHZBHWANE20906Item.基本属性组_完成日期,date);
	}

}
